package com.fisicaapp;



import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;

public class ActcinemDatos extends Activity {
	private TextView [] tview;
	private String data[];

  @Override
  public void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    
    setContentView(R.layout.appcinemaceleraciondatos);    
    Bundle extras = getIntent().getExtras();    
    data = extras.getStringArray("yourkey");
    
    tview   = new TextView[9];
    
    tview[0] = (TextView) findViewById(R.id.textView2_1);    
    tview[1] = (TextView) findViewById(R.id.textView2_2);
    tview[2] = (TextView) findViewById(R.id.textView2_3);
    tview[3] = (TextView) findViewById(R.id.textView2_4);
    tview[4] = (TextView) findViewById(R.id.textView2_5);
    tview[5] = (TextView) findViewById(R.id.textView2_6);
    tview[6] = (TextView) findViewById(R.id.textView2_7);
    tview[7] = (TextView) findViewById(R.id.textView2_8);
    tview[8] = (TextView) findViewById(R.id.textView2_9);
     
        
    if (data.length==9){    	
    	for (int i=0;i<tview.length;i++){
        	tview[i].setText(data[i]);
        }
    }
    else{
    		Log.d("error","Formato invalido");
    }
   
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.menu_volver, menu);
      return true;
  }

  /* Items del menu */
  public boolean onOptionsItemSelected(MenuItem item) { //acciones para los elementos del menu
      switch (item.getItemId()) {
      
      case R.id.VolverX:
      	finish();
          
      }
      return true;
  }
  

  @Override
  public void finish() {
	  //NO DEVUELVO NADA
    //Intent intent = new Intent();
    //EditText editText= (EditText) findViewById(R.id.textView2);
    //String salida = ""; //datos de retorno al activity anterior! codificados con 0 y 1 a los checkbox
    //salida = data;    
    //intent.putExtra("returnkey", salida);
    //setResult(RESULT_OK, intent);
    
    super.finish();
  }
} 